package com.atguigu.bean;

import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.annotation.PreDestroy;

/**
 * @author : wenchao.long
 * @date : Created in 2020/11/15 14:38:24 周日
 * @description :
 */
@Component
public class Dog {
    public Dog() {
        System.out.println("dog constructor...");
    }

    @PostConstruct
    public void init() {
        System.out.println("dog...对象创建并赋值之后调用");
    }

    @PreDestroy
    public void destroy() {
        System.out.println("dog...容器销毁bean");
    }
}
